package musicstore.biz.impl;

import java.sql.Date;
import java.util.List;

import musicstore.biz.OrderBiz;
import musicstore.dao.OrderDao;
import musicstore.entity.Order;

public class OrderBizImpl implements OrderBiz{

	private OrderDao orderDao;
	public void setOrderDao(OrderDao orderDao) {
		this.orderDao = orderDao;
	}

	@Override
	public void add(Order order) {
		orderDao.add(order);
	}

	@Override
	public List<Order> getListByDeliver(int isDeliveried) {
		return orderDao.getListByDeliver(isDeliveried);
	}

	@Override
	public List<Order> getListByDate(int isDeliveried, int orderId,
			Date startDate, Date endDate) {
		return orderDao.getListByDate(isDeliveried, orderId, startDate, endDate);
	}

	@Override
	public Order getOrderById(int id) {
		return orderDao.getOrderById(id);
	}

}
